package com.levy.contronller.javaWeb.shiroTest;

/**
 * Created by 郭利伟 on 2017.08.27.
 */
public class RedisRealm {

//    @Override
//    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
//        return null;
//    }
//
//    @Override
//    protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
//        UsernamePasswordToken user = (UsernamePasswordToken)authenticationToken;
//        String username = user.getUsername();
//        //去redis缓存中获取值
//        RedisUtil redis = RedisUtil.getRu();
//        String pass = redis.get(username);
//        if (StringUtils.isBlank(pass)){
//
//        }
//        //如果不存在 捕获异常
//        return new SimpleAccount(username,"密码",RedisRealm.class.getName());
//    }
}
